package com.dks.util;

/**
 * Integer 相关工具类
 */
public class IntegerUtils {

    /**
     * 字符串转为Integer 异常返回为null
     * @author evan
     */
    public static Integer String2Integer(String s){
        Integer i = null;
        try {
            i = Integer.valueOf(s);
        }catch (Exception e){
            return null;
        }
        return i;
    }


    public static void main(String[] args) {
        String s = "null";
        System.out.println(String2Integer(s));
    }
}
